using UnityEngine;

public class HpMgr : MonoBehaviour
{
    public static HpMgr ins;
    public GameObject hpBarPre;
    void Awake()
    {
        ins = this;
    }

    public HpBar AddHp(Transform target)
    {
        GameObject go = Instantiate(hpBarPre, transform);
        HpBar hpB = go.GetComponent<HpBar>();
        hpB.init(target);
        return hpB;
    }



    // public static HpMgr ins;
    // public GameObject hpBarPre;
    // void Awake()
    // {
    //     ins = this;
    // }
    // /// <summary>添加血条，返回HpBar</summary>
    // /// <param name="target">血条跟随目录</param>
    // public HpBar AddHp(Transform target)
    // {
    //     GameObject go = Instantiate(hpBarPre, transform);
    //     HpBar hpBar = go.GetComponent<HpBar>();
    //     hpBar.init(target);
    //     return hpBar;
    // }

    void Update()
    {

    }
}
